fix(bindx-ui): quiet the datagrid cell filter affordance, advertise it in the header - #104
Closed
matej21 wants to merge 2 commits into
Closed
fix(bindx-ui): quiet the datagrid cell filter affordance, advertise it in the header#104matej21 wants to merge 2 commits into
matej21 wants to merge 2 commits into
Conversation
…ocus A permanent dashed underline in every relation and enum cell reads as "link" or "has a tooltip", while it actually means "click for filter actions" — permanent noise for a power-user feature. The decoration stays underline-based, so the wrapped-text fix from 2bbd12f is preserved; only its color is now transparent at rest. The label becomes focusable and the tooltip opens on focus-within, so the filter actions are reachable without a mouse. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Euwkf2wtutqvtE4YRutU5R
The header icon used to appear only once a filter was set, so nothing told an operator which columns can be filtered. It now always renders: muted when idle, blue when a filter is active. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Euwkf2wtutqvtE4YRutU5R
Member
Author
|
Consolidated into #109, merged there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What the affordance signalled vs. what it means
A dashed underline is the
<abbr>convention: "this term is special / has a definition", or simply "this is a link". In the datagrid it means something else entirely — "click for filter actions". Every relation and enum cell of every datagrid paid that cost permanently, which is a lot of standing visual noise for a power-user feature.This moves the permanent "you can filter here" signal to the column header, where it belongs, and keeps the per-cell "filter by this value" shortcut as an on-demand affordance.
The two changes
1. Cell — the decoration is revealed on hover and on keyboard focus (
datagrid/ui/label-ui.tsx,ui/tooltip.tsx)The underline is still there geometrically, just
decoration-transparentat rest; it fades in togray-400on hover andgray-800onfocus-visible. It staystext-decoration-based rather thanborder-b, so the wrapped-text fix from 2bbd12f is preserved — a wrapped relation name still underlines per line instead of looking struck through.The label also gets
tabIndex={0}and the tooltip now opens ongroup-focus-within, so the Filter / Exclude actions are reachable without a mouse. They previously were not reachable at all by keyboard.2. Header — a muted filter icon on every filterable column (
datagrid/column-header.tsx)DataGridColumnFilterIconused to rendernullwhile the filter was empty, so nothing told an operator which columns can be filtered. It now always renders:text-muted-foreground/50when idle, unchangedtext-blue-600when a filter is active. That is the same idle-grey / active-blue convention the sorting icons in this header already use.Verified in the browser
Checked in the example playground (
bun run playground), where Author is a has-one relation column. Computed styles, not just intent:text-decoration: underline dashed rgba(0, 0, 0, 0)— the geometry is kept, the colour is invisible. Cells read as plain text, and no header icon competes with the data.text-decoration-colorresolves to gray-400 and the Filter / Exclude tooltip opens. Neighbouring cells stay quiet.text-decoration-colorresolves to gray-800, a 1px--color-ringfocus ring appears and the tooltip opens. One more Tab moves into the tooltip's Filter button and Enter applies the filter — the path that did not exist before this change.Two caveats about the verification itself:
DataGridTooltipLabel, so the styling is identical, but that is inference, not observation.DataGridTooltipLabelat all:columns/has-many-column.tsxbails when the related accessor id is null, which for a list is always. That is pre-existing and untouched here, but it means this change visibly affects has-one and enum columns, not all three.Scope
border-bstrikethrough on wrapped text — already landed separately in 2bbd12f. This PR is the UX half.DataGridTooltipLabelis shared by the has-one, has-many and enum cells, so all three change together. That is intended.Verified:
bun run typecheckclean,bun run test2026 pass / 0 fail.Fixes #30
🤖 Generated with Claude Code
https://claude.ai/code/session_01Euwkf2wtutqvtE4YRutU5R